Optimal. Leaf size=250 \[ \frac{\left (95 a c^3 d+80 a c d^3+112 b c^2 d^2+12 b c^4+16 b d^4\right ) \tan (e+f x)}{30 f}+\frac{\left (24 a c^2 d^2+8 a c^4+3 a d^4+16 b c^3 d+12 b c d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{\left (35 a c d+12 b c^2+16 b d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{60 f}+\frac{d \left (130 a c^2 d+45 a d^3+24 b c^3+116 b c d^2\right ) \tan (e+f x) \sec (e+f x)}{120 f}+\frac{(5 a d+4 b c) \tan (e+f x) (c+d \sec (e+f x))^3}{20 f}+\frac{b \tan (e+f x) (c+d \sec (e+f x))^4}{5 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.500991, antiderivative size = 250, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {4002, 3997, 3787, 3770, 3767, 8} \[ \frac{\left (95 a c^3 d+80 a c d^3+112 b c^2 d^2+12 b c^4+16 b d^4\right ) \tan (e+f x)}{30 f}+\frac{\left (24 a c^2 d^2+8 a c^4+3 a d^4+16 b c^3 d+12 b c d^3\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{\left (35 a c d+12 b c^2+16 b d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{60 f}+\frac{d \left (130 a c^2 d+45 a d^3+24 b c^3+116 b c d^2\right ) \tan (e+f x) \sec (e+f x)}{120 f}+\frac{(5 a d+4 b c) \tan (e+f x) (c+d \sec (e+f x))^3}{20 f}+\frac{b \tan (e+f x) (c+d \sec (e+f x))^4}{5 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4002
Rule 3997
Rule 3787
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \sec (e+f x) (a+b \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx &=\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}+\frac{1}{5} \int \sec (e+f x) (c+d \sec (e+f x))^3 (5 a c+4 b d+(4 b c+5 a d) \sec (e+f x)) \, dx\\ &=\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}+\frac{1}{20} \int \sec (e+f x) (c+d \sec (e+f x))^2 \left (20 a c^2+28 b c d+15 a d^2+\left (12 b c^2+35 a c d+16 b d^2\right ) \sec (e+f x)\right ) \, dx\\ &=\frac{\left (12 b c^2+35 a c d+16 b d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}+\frac{1}{60} \int \sec (e+f x) (c+d \sec (e+f x)) \left (60 a c^3+108 b c^2 d+115 a c d^2+32 b d^3+\left (24 b c^3+130 a c^2 d+116 b c d^2+45 a d^3\right ) \sec (e+f x)\right ) \, dx\\ &=\frac{d \left (24 b c^3+130 a c^2 d+116 b c d^2+45 a d^3\right ) \sec (e+f x) \tan (e+f x)}{120 f}+\frac{\left (12 b c^2+35 a c d+16 b d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}+\frac{1}{120} \int \sec (e+f x) \left (15 \left (8 a c^4+16 b c^3 d+24 a c^2 d^2+12 b c d^3+3 a d^4\right )+4 \left (12 b c^4+95 a c^3 d+112 b c^2 d^2+80 a c d^3+16 b d^4\right ) \sec (e+f x)\right ) \, dx\\ &=\frac{d \left (24 b c^3+130 a c^2 d+116 b c d^2+45 a d^3\right ) \sec (e+f x) \tan (e+f x)}{120 f}+\frac{\left (12 b c^2+35 a c d+16 b d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}+\frac{1}{8} \left (8 a c^4+16 b c^3 d+24 a c^2 d^2+12 b c d^3+3 a d^4\right ) \int \sec (e+f x) \, dx+\frac{1}{30} \left (12 b c^4+95 a c^3 d+112 b c^2 d^2+80 a c d^3+16 b d^4\right ) \int \sec ^2(e+f x) \, dx\\ &=\frac{\left (8 a c^4+16 b c^3 d+24 a c^2 d^2+12 b c d^3+3 a d^4\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{d \left (24 b c^3+130 a c^2 d+116 b c d^2+45 a d^3\right ) \sec (e+f x) \tan (e+f x)}{120 f}+\frac{\left (12 b c^2+35 a c d+16 b d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}-\frac{\left (12 b c^4+95 a c^3 d+112 b c^2 d^2+80 a c d^3+16 b d^4\right ) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{30 f}\\ &=\frac{\left (8 a c^4+16 b c^3 d+24 a c^2 d^2+12 b c d^3+3 a d^4\right ) \tanh ^{-1}(\sin (e+f x))}{8 f}+\frac{\left (12 b c^4+95 a c^3 d+112 b c^2 d^2+80 a c d^3+16 b d^4\right ) \tan (e+f x)}{30 f}+\frac{d \left (24 b c^3+130 a c^2 d+116 b c d^2+45 a d^3\right ) \sec (e+f x) \tan (e+f x)}{120 f}+\frac{\left (12 b c^2+35 a c d+16 b d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac{(4 b c+5 a d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac{b (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f}\\ \end{align*}
Mathematica [A] time = 4.42882, size = 201, normalized size = 0.8 \[ \frac{15 \left (a \left (24 c^2 d^2+8 c^4+3 d^4\right )+4 b c d \left (4 c^2+3 d^2\right )\right ) \tanh ^{-1}(\sin (e+f x))+\tan (e+f x) \left (8 \left (10 d^2 \left (2 a c d+b \left (3 c^2+d^2\right )\right ) \tan ^2(e+f x)+15 \left (4 a c d \left (c^2+d^2\right )+b \left (6 c^2 d^2+c^4+d^4\right )\right )+3 b d^4 \tan ^4(e+f x)\right )+15 d \left (3 a d \left (8 c^2+d^2\right )+4 b \left (4 c^3+3 c d^2\right )\right ) \sec (e+f x)+30 d^3 (a d+4 b c) \sec ^3(e+f x)\right )}{120 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.048, size = 431, normalized size = 1.7 \begin{align*}{\frac{a{c}^{4}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{f}}+4\,{\frac{a{c}^{3}d\tan \left ( fx+e \right ) }{f}}+3\,{\frac{a{c}^{2}{d}^{2}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{f}}+3\,{\frac{a{c}^{2}{d}^{2}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{f}}+{\frac{8\,ac{d}^{3}\tan \left ( fx+e \right ) }{3\,f}}+{\frac{4\,ac{d}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3\,f}}+{\frac{a{d}^{4}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{4\,f}}+{\frac{3\,a{d}^{4}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{8\,f}}+{\frac{3\,a{d}^{4}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{8\,f}}+{\frac{b{c}^{4}\tan \left ( fx+e \right ) }{f}}+2\,{\frac{b{c}^{3}d\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{f}}+2\,{\frac{b{c}^{3}d\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{f}}+4\,{\frac{b{c}^{2}{d}^{2}\tan \left ( fx+e \right ) }{f}}+2\,{\frac{b{c}^{2}{d}^{2}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{f}}+{\frac{bc{d}^{3}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{3}}{f}}+{\frac{3\,bc{d}^{3}\sec \left ( fx+e \right ) \tan \left ( fx+e \right ) }{2\,f}}+{\frac{3\,bc{d}^{3}\ln \left ( \sec \left ( fx+e \right ) +\tan \left ( fx+e \right ) \right ) }{2\,f}}+{\frac{8\,b{d}^{4}\tan \left ( fx+e \right ) }{15\,f}}+{\frac{b{d}^{4}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{4}}{5\,f}}+{\frac{4\,b{d}^{4}\tan \left ( fx+e \right ) \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{15\,f}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.15576, size = 512, normalized size = 2.05 \begin{align*} \frac{480 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} b c^{2} d^{2} + 320 \,{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a c d^{3} + 16 \,{\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} b d^{4} - 60 \, b c d^{3}{\left (\frac{2 \,{\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 15 \, a d^{4}{\left (\frac{2 \,{\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 240 \, b c^{3} d{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 360 \, a c^{2} d^{2}{\left (\frac{2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 240 \, a c^{4} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 240 \, b c^{4} \tan \left (f x + e\right ) + 960 \, a c^{3} d \tan \left (f x + e\right )}{240 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.616146, size = 687, normalized size = 2.75 \begin{align*} \frac{15 \,{\left (8 \, a c^{4} + 16 \, b c^{3} d + 24 \, a c^{2} d^{2} + 12 \, b c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{5} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \,{\left (8 \, a c^{4} + 16 \, b c^{3} d + 24 \, a c^{2} d^{2} + 12 \, b c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{5} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \,{\left (24 \, b d^{4} + 8 \,{\left (15 \, b c^{4} + 60 \, a c^{3} d + 60 \, b c^{2} d^{2} + 40 \, a c d^{3} + 8 \, b d^{4}\right )} \cos \left (f x + e\right )^{4} + 15 \,{\left (16 \, b c^{3} d + 24 \, a c^{2} d^{2} + 12 \, b c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{3} + 16 \,{\left (15 \, b c^{2} d^{2} + 10 \, a c d^{3} + 2 \, b d^{4}\right )} \cos \left (f x + e\right )^{2} + 30 \,{\left (4 \, b c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f \cos \left (f x + e\right )^{5}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec{\left (e + f x \right )}\right ) \left (c + d \sec{\left (e + f x \right )}\right )^{4} \sec{\left (e + f x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.45158, size = 1207, normalized size = 4.83 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]